#ifndef QBCIGLINTERFACE_H
#define QBCIGLINTERFACE_H
#include "qbcitargetsgroup.h"
#include <QOpenGLWidget>
#include <QTimer>

class QBciGLInterface : public QOpenGLWidget {
  Q_OBJECT

public:
  QBciGLInterface(QWidget *parent = nullptr);
  ~QBciGLInterface();

  void init();
  QBciTargetsGroup *targets() { return Targets; }

private:
  // update timer
  QTimer updateTimer;

  QBciTargetsGroup *Targets;

  bool isFullScreen = true;

protected:
  void paintEvent(QPaintEvent *event) override;
  void keyReleaseEvent(QKeyEvent *event) override;

  /**
   * @brief targetsInit add need targets
   */
  virtual void targetsInit() = 0;

private:
  QTimer mFreshTimer;
};
#endif
